]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
grabHelper: Restore the actually saved focus on ungrab
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 9 Feb 2013 22:05:43 +0000 (23:05 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 14 Feb 2013 18:17:32 +0000 (19:17 +0100)
GrabHelper saves the actor that had key focus when taking over the grab
(if any). On ungrab, the key focus is either restored or moved to some
child of the saved actor. The latter is unexpected and causes some odd
behavior, so don't be fancy and only restore the actual focus.

https://bugzilla.gnome.org/show_bug.cgi?id=693570

js/ui/grabHelper.js

index 315e2d49b036580db48055b309af710a977e5b1a..fe3a121cef309b67a63d74fa8b575f71a8c3ffe9 100644 (file)
@@ -311,7 +311,8 @@ const GrabHelper = new Lang.Class({
 
         if (hadFocus) {
             let poppedGrab = poppedGrabs[0];
-            _navigateActor(poppedGrab.savedFocus);
+            if (poppedGrab.savedFocus)
+                poppedGrab.savedFocus.grab_key_focus();
         }
     },